﻿namespace WeWork.Model
{
    /// <summary>
    /// 语音
    /// </summary>
    public class ChatVoice : MsgChatRoomBase
    {
        /*
        {
            "msgid":"10958372969718811103_1603875609",
            "action":"send",
            "from":"wmGAgeDQAAdBjb8CK4ieMPRm7Cqm-9VA",
            "tolist":["kenshin"],
            "roomid":"",
            "msgtime":1603875609704,
            "msgtype":"voice",
            "voice":{
                "md5sum":"9db09c7fa627c9e53f17736c786a74d5",
                "voice_size":6810,
                "play_length":10,
                "sdkfileid":"kcyZjZqOXhETGYxajB2Zkp5Rk8zYzh4RVF3ZzZGdXlXNWRjMUoxVGZxbzFTTDJnQ2YxL0NraVcxUUJNK3VUamhEVGxtNklCbjZmMEEwSGRwN0h2cU1GQTU1MDRSMWdTSmN3b25ZMkFOeG5hMS90Y3hTQ0VXRlVxYkR0Ymt5c3JmV2VVcGt6UlNXR1ZuTFRWVGtudXVldDRjQ3hscDBrMmNhMFFXVnAwT3Y5NGVqVGpOcWNQV2wrbUJwV01TRm9xWmNDRVVrcFY5Nk9OUS9GbXIvSmZvOVVZZjYxUXBkWnMvUENkVFQxTHc2N0drb2pJT0FLZnhVekRKZ1FSNDU3ZnZtdmYvTzZDOG9DRXl2SUNIOHc9PRI0TkRkZk56ZzRNVE13TVRjMk5qQTRNak0yTmw4ek5qRTVOalExTjE4eE5qQXpPRGMxTmpBNRogNzM3MDY2NmM2YTc5Njg3NDdhNzU3NDY0NzY3NTY4NjY="
            }
        }
        */
        /// <summary>
        /// 消息内容
        /// </summary>
        public VoiceInfo voice { set; get; }
    }

    public class VoiceInfo
    {
        /// <summary>
        /// 资源的md5值，供进行校验。String类型
        /// </summary>
        public string md5sum { set; get; }
        /// <summary>
        /// 语音消息大小。Uint32类型
        /// </summary>
        public int voice_size { set; get; }
        /// <summary>
        /// 播放长度。Uint32类型
        /// </summary>
        public int play_length { set; get; }
        /// <summary>
        /// 媒体资源的id信息。String类型
        /// </summary>
        public string sdkfileid { set; get; }
    }
}
